/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package doan.quanlycanbo.portlet.service.persistence;

import com.liferay.portal.service.persistence.BasePersistence;

import doan.quanlycanbo.portlet.model.sachxuatban;

/**
 * The persistence interface for the sachxuatban service.
 *
 * <p>
 * Never modify or reference this interface directly. Always use {@link sachxuatbanUtil} to access the sachxuatban persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
 * </p>
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Nguyen Tuan Vinh
 * @see sachxuatbanPersistenceImpl
 * @see sachxuatbanUtil
 * @generated
 */
public interface sachxuatbanPersistence extends BasePersistence<sachxuatban> {
	/**
	* Caches the sachxuatban in the entity cache if it is enabled.
	*
	* @param sachxuatban the sachxuatban to cache
	*/
	public void cacheResult(
		doan.quanlycanbo.portlet.model.sachxuatban sachxuatban);

	/**
	* Caches the sachxuatbans in the entity cache if it is enabled.
	*
	* @param sachxuatbans the sachxuatbans to cache
	*/
	public void cacheResult(
		java.util.List<doan.quanlycanbo.portlet.model.sachxuatban> sachxuatbans);

	/**
	* Creates a new sachxuatban with the primary key. Does not add the sachxuatban to the database.
	*
	* @param masxb the primary key for the new sachxuatban
	* @return the new sachxuatban
	*/
	public doan.quanlycanbo.portlet.model.sachxuatban create(long masxb);

	/**
	* Removes the sachxuatban with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param masxb the primary key of the sachxuatban to remove
	* @return the sachxuatban that was removed
	* @throws doan.quanlycanbo.portlet.NoSuchsachxuatbanException if a sachxuatban with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public doan.quanlycanbo.portlet.model.sachxuatban remove(long masxb)
		throws com.liferay.portal.kernel.exception.SystemException,
			doan.quanlycanbo.portlet.NoSuchsachxuatbanException;

	public doan.quanlycanbo.portlet.model.sachxuatban updateImpl(
		doan.quanlycanbo.portlet.model.sachxuatban sachxuatban, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds the sachxuatban with the primary key or throws a {@link doan.quanlycanbo.portlet.NoSuchsachxuatbanException} if it could not be found.
	*
	* @param masxb the primary key of the sachxuatban to find
	* @return the sachxuatban
	* @throws doan.quanlycanbo.portlet.NoSuchsachxuatbanException if a sachxuatban with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public doan.quanlycanbo.portlet.model.sachxuatban findByPrimaryKey(
		long masxb)
		throws com.liferay.portal.kernel.exception.SystemException,
			doan.quanlycanbo.portlet.NoSuchsachxuatbanException;

	/**
	* Finds the sachxuatban with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param masxb the primary key of the sachxuatban to find
	* @return the sachxuatban, or <code>null</code> if a sachxuatban with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public doan.quanlycanbo.portlet.model.sachxuatban fetchByPrimaryKey(
		long masxb) throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds all the sachxuatbans where groupId = &#63; and languageId = &#63;.
	*
	* @param groupId the group id to search with
	* @param languageId the language id to search with
	* @return the matching sachxuatbans
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<doan.quanlycanbo.portlet.model.sachxuatban> findByG_L(
		long groupId, java.lang.String languageId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds a range of all the sachxuatbans where groupId = &#63; and languageId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param groupId the group id to search with
	* @param languageId the language id to search with
	* @param start the lower bound of the range of sachxuatbans to return
	* @param end the upper bound of the range of sachxuatbans to return (not inclusive)
	* @return the range of matching sachxuatbans
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<doan.quanlycanbo.portlet.model.sachxuatban> findByG_L(
		long groupId, java.lang.String languageId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds an ordered range of all the sachxuatbans where groupId = &#63; and languageId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param groupId the group id to search with
	* @param languageId the language id to search with
	* @param start the lower bound of the range of sachxuatbans to return
	* @param end the upper bound of the range of sachxuatbans to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of matching sachxuatbans
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<doan.quanlycanbo.portlet.model.sachxuatban> findByG_L(
		long groupId, java.lang.String languageId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds the first sachxuatban in the ordered set where groupId = &#63; and languageId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param groupId the group id to search with
	* @param languageId the language id to search with
	* @param orderByComparator the comparator to order the set by
	* @return the first matching sachxuatban
	* @throws doan.quanlycanbo.portlet.NoSuchsachxuatbanException if a matching sachxuatban could not be found
	* @throws SystemException if a system exception occurred
	*/
	public doan.quanlycanbo.portlet.model.sachxuatban findByG_L_First(
		long groupId, java.lang.String languageId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			doan.quanlycanbo.portlet.NoSuchsachxuatbanException;

	/**
	* Finds the last sachxuatban in the ordered set where groupId = &#63; and languageId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param groupId the group id to search with
	* @param languageId the language id to search with
	* @param orderByComparator the comparator to order the set by
	* @return the last matching sachxuatban
	* @throws doan.quanlycanbo.portlet.NoSuchsachxuatbanException if a matching sachxuatban could not be found
	* @throws SystemException if a system exception occurred
	*/
	public doan.quanlycanbo.portlet.model.sachxuatban findByG_L_Last(
		long groupId, java.lang.String languageId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			doan.quanlycanbo.portlet.NoSuchsachxuatbanException;

	/**
	* Finds the sachxuatbans before and after the current sachxuatban in the ordered set where groupId = &#63; and languageId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param masxb the primary key of the current sachxuatban
	* @param groupId the group id to search with
	* @param languageId the language id to search with
	* @param orderByComparator the comparator to order the set by
	* @return the previous, current, and next sachxuatban
	* @throws doan.quanlycanbo.portlet.NoSuchsachxuatbanException if a sachxuatban with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public doan.quanlycanbo.portlet.model.sachxuatban[] findByG_L_PrevAndNext(
		long masxb, long groupId, java.lang.String languageId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			doan.quanlycanbo.portlet.NoSuchsachxuatbanException;

	/**
	* Finds all the sachxuatbans.
	*
	* @return the sachxuatbans
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<doan.quanlycanbo.portlet.model.sachxuatban> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds a range of all the sachxuatbans.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of sachxuatbans to return
	* @param end the upper bound of the range of sachxuatbans to return (not inclusive)
	* @return the range of sachxuatbans
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<doan.quanlycanbo.portlet.model.sachxuatban> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds an ordered range of all the sachxuatbans.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of sachxuatbans to return
	* @param end the upper bound of the range of sachxuatbans to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of sachxuatbans
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<doan.quanlycanbo.portlet.model.sachxuatban> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the sachxuatbans where groupId = &#63; and languageId = &#63; from the database.
	*
	* @param groupId the group id to search with
	* @param languageId the language id to search with
	* @throws SystemException if a system exception occurred
	*/
	public void removeByG_L(long groupId, java.lang.String languageId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the sachxuatbans from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Counts all the sachxuatbans where groupId = &#63; and languageId = &#63;.
	*
	* @param groupId the group id to search with
	* @param languageId the language id to search with
	* @return the number of matching sachxuatbans
	* @throws SystemException if a system exception occurred
	*/
	public int countByG_L(long groupId, java.lang.String languageId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Counts all the sachxuatbans.
	*
	* @return the number of sachxuatbans
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;
}